import { createApp } from 'vue';
import App from './App.vue';
import  ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';

import {createRouter, createWebHistory} from "vue-router";

import './assets/font/font.css'

import Login from "./components/Login.vue";
import Home from "./components/Home.vue";
import Option from "./components/Option.vue";
import Set from "./components/Set.vue";
import Registry from "./components/Registry.vue";
import UserList from "./components/UserList.vue";
import CodeList from "./components/CodeList.vue";
import HeadChange from "./components/HeadChange.vue";
import FindPassword from "./components/FindPassword.vue";

const routes = [
    { path: '/user/login', component: Login },
    { path: '/user/registry', component: Registry },
    { path: '/user/home', component: Home },
    { path: '/user/forgot', component: FindPassword },
    { path: '/', component: Home },

    { path: '/user/option', component: Option },
    { path: '/user/connect', component: Login },
    { path: '/user/count', component: Login },
    { path: '/user/set', component: Set },
    { path: '/user/head', component: HeadChange },
    { path: '/user/space', component: Login },

    { path: '/admin/list', component: UserList },
    { path: '/root/code', component: CodeList },

];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

createApp(App).use(router).use(ElementPlus).mount('#app')